ERROR: Formula failed: Formula set-attribute: Not allowed to set `id` attribute.

Collapse
X
 
  • Time
  • Show
Clear All
new posts

  • yuri
    replied
    You can do the same in a before-save hook. https://docs.espocrm.com/development/hooks/

    Or create a custom formula function that changes the ID https://github.com/espocrm/documenta...-in-formula.md

    We can't allow setting ID from the formula as it's a breaking of the application logic.
    Last edited by yuri; 05-25-2022, 07:03 AM.

    Leave a comment:


  • AmanovRu
    replied
    very sorry to hear that

    Leave a comment:


  • yuri
    replied
    This is not a bug so won't be fixed.

    Leave a comment:


  • AmanovRu
    replied
    I have a very big request, we have been working in this system with the current logic for three years, if you have time, find an opportunity to fix it. I had to roll back the system, but I would hate to miss updates.

    Leave a comment:


  • yuri
    replied
    I recommend to have this logic in a beforeSave hook.

    Leave a comment:


  • AmanovRu
    replied
    Is there any way to disable this feature in my case? We use the customer's phone number as the contact ID.

    Leave a comment:


  • yuri
    replied
    Why do you set id in the formula. There should not be a reason to do that. Your formula breaks the logic of the application and the new fix prevents this. It's not a bug. The error message explains what is happened. No reason to create a bug report.
    Last edited by yuri; 05-24-2022, 11:24 AM.

    Leave a comment:


  • ERROR: Formula failed: Formula set-attribute: Not allowed to set `id` attribute.

    After installing update 7.1.0. formula has stopped working. Entity contact.

    Formula example:
    ifThen(
    entity\isNew(),
    id = newphoneNumber
    );


    ERROR: Workflow[628cae3704800b759]: Action failed [updateEntity] with cid [0], details: Formula set-attribute: Not allowed to set `id` attribute..
Working...